home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 26 / AACD 26.iso / AACD / Online / x3270 / unix_files / mkversion.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  2007-12-08  |  761 b   |  28 lines

  1. #! /bin/sh
  2. # Copyright 1995, 1999 by Paul Mattes.
  3. #  Permission to use, copy, modify, and distribute this software and its
  4. #  documentation for any purpose and without fee is hereby granted,
  5. #  provided that the above copyright notice appear in all copies and that
  6. #  both that copyright notice and this permission notice appear in
  7. #  supporting documentation.
  8. #
  9. # Create version.o from version.txt
  10. #set -x
  11.  
  12. set -e
  13.  
  14. . ./version.txt
  15. builddate=`date`
  16. sccsdate=`date +%Y/%m/%d`
  17. user=${LOGNAME-$USER}
  18.  
  19. trap 'rm -f version.c' 0 1 2 15
  20.  
  21. cat <<EOF >version.c
  22. const char *build = "${2-x3270} v$version $builddate $user";
  23. const char *app_defaults_version = "$adversion";
  24. static const char sccsid[] = "@(#)${2-x3270} v$version $sccsdate $user";
  25. EOF
  26.  
  27. ${1-cc} -c version.c
  28.